/*
 * @(#)NewContentRepositoryTest.java $version 2012. 3. 12.
 *
 * Copyright 2012 NHN Corp. All rights Reserved. 
 * NHN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package com.mywep.myalimi.repository.content;

import java.util.Calendar;
import java.util.List;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.mywep.myalimi.model.NewContent;

import com.nhncorp.lucy.spring.core.util.DataMap;

/**
 * @author 한지웅
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext.xml")
public class NewContentRepositoryTest {
	@Autowired
	private NewContentRepository newContentRepository;

	/**
	 * @throws java.lang.Exception
	 */

	/**
	 * Test method for {@link com.mywep.myalimi.repository.content.NewContentRepository#countByExample(com.nhncorp.lucy.spring.core.util.ExtendedMap)}.
	 */
	@Test
	public void testCountByExample() {
		DataMap param = new DataMap();
		int result = newContentRepository.countByExample(param);
	}

	/**
	 * Test method for {@link com.mywep.myalimi.repository.content.NewContentRepository#selectByExample(com.nhncorp.lucy.spring.core.util.ExtendedMap)}.
	 */
	@Test
	public void testSelectByExample() {
		DataMap param = new DataMap();
		param.put("keyword", "넥솔론");
		List<NewContent> list = newContentRepository.selectByExample(param);
	}

	/**
	 * Test method for {@link com.mywep.myalimi.repository.content.NewContentRepository#selectByPrimaryKey(com.mywep.myalimi.model.Engine)}.
	 */
	//	@Test
	public void testSelectByPrimaryKey() {
		NewContent param = new NewContent();
		param.setContentKey(0);
		NewContent engine = newContentRepository.selectByPrimaryKey(param);
	}

	/**
	 * 
	 */
	//	@Test
	public void testInsert() {
		NewContent param = new NewContent();
		param.setContextType("NEWS");
		param.setKeyword("keyword");
		param.setSummary("summary");
		param.setTitle("title");
		param.setRegDate(Calendar.getInstance().getTime());
		param.setUrl("url");
		newContentRepository.insert(param);
	}

}
